layui.use(['layer','laypage'], function () {
    var $= layui.jquery,layer=layui.layer,pager = layui.laypage;
    var path=window.location.pathname;
    pager.render({
        elem: 'pager',
        count: parseInt($("input[name='totalPages']").val()),
        theme: '#1E9FFF',
        curr:parseInt($("input[name='current']").val()),
        limit:11,
        jump:function (obj, first) {
            $("input[name='current']").val(obj.curr);
            if(!first){
                $(".layui-form").attr("action",path).submit();
            }
        }
    });
    $(".layui-custom-search span").on("click",function () {
        $(".layui-form").attr("action",path).submit();
    });
    $(".layui-custom-li").on("click",function () {
        var id=$(this).attr("content");
        layer.open({
            type: 2,
            area: ['10px', '10px'],
            fixed: false, //不固定
            maxmin: false,
            content:'/uc/schedule/entity/'+id+'/dispatch'
        });
    });
});